package springbook.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springbook.model.BookInfo;

@RequestMapping("/test")
@RestController
public class TestController {

    @RequestMapping("/t1")
    public String t1() {
        int[] a={1,2,3};
        System.out.println(a[5]);
        return "t1";
    }

    @RequestMapping("/t2")
    public Integer t2() {
        int a=10/0;
        return 1;
    }

    @RequestMapping("/t3")
    public Boolean t3() {
        String s = null;
        System.out.println(s.length());
        return false;
    }

    @RequestMapping("/t4")
    public BookInfo t4() {
        return new BookInfo();
    }
}
